package com.xu.t1.model;

import java.util.Map;
import java.util.HashMap;

public class ThreadAllocationContext {

    // 数据量
    private int totalSize;

    // 系统最大线程数
    private int maxThreads;

    // 节点最大线程数
    private int serverMaxThreads;

    // 系统总线程数
    private int totalThreads;

    // 节点总数
    private int nodeCount;

    // 可分配节点数 （动态处理）
    private int allocatableThreads;


    // 权重参数（人数增量权重，线程使用权重，最大线程保留比例）
    private double alphaPeopleWeight = 0.5;
    private double betaThreadWeight = 0.5;
    private double maxThreadReserveRatio = 0.3;

    // 总在线人数和总已用线程数
    private int totalOnlineUsers;
    private int totalUsedThreads;

    // 当前节点在线人数和已用线程
    private int serverOnlineUsers;
    private int serverUsedThreads;

    // 当前节点平均单位人数线程使用数
    private int avgThreadCont;

    // 当前节点平均单次任务处理时间
    private int avgDuration;

    // 单位时间平均人数增量
    private int averageOnlineGrowthRate;

    // 平均样本量
    private int averageSampleSize = 30;


    // Getter 和 Setter

    public int getTotalThreads() {
        return totalThreads;
    }

    public void setTotalThreads(int totalThreads) {
        this.totalThreads = totalThreads;
    }

    public int getNodeCount() {
        return nodeCount;
    }

    public void setNodeCount(int nodeCount) {
        this.nodeCount = nodeCount;
    }


    public double getAlphaPeopleWeight() {
        return alphaPeopleWeight;
    }

    public void setAlphaPeopleWeight(double alphaPeopleWeight) {
        this.alphaPeopleWeight = alphaPeopleWeight;
    }

    public double getBetaThreadWeight() {
        return betaThreadWeight;
    }

    public void setBetaThreadWeight(double betaThreadWeight) {
        this.betaThreadWeight = betaThreadWeight;
    }

    public int getTotalOnlineUsers() {
        return totalOnlineUsers;
    }

    public void setTotalOnlineUsers(int totalOnlineUsers) {
        this.totalOnlineUsers = totalOnlineUsers;
    }

    public int getTotalUsedThreads() {
        return totalUsedThreads;
    }

    public void setTotalUsedThreads(int totalUsedThreads) {
        this.totalUsedThreads = totalUsedThreads;
    }

    public int getAllocatableThreads() {
        return allocatableThreads;
    }

    public void setAllocatableThreads(int allocatableThreads) {
        this.allocatableThreads = allocatableThreads;
    }

    public int getServerOnlineUsers() {
        return serverOnlineUsers;
    }

    public void setServerOnlineUsers(int serverOnlineUsers) {
        this.serverOnlineUsers = serverOnlineUsers;
    }

    public int getServerUsedThreads() {
        return serverUsedThreads;
    }

    public void setServerUsedThreads(int serverUsedThreads) {
        this.serverUsedThreads = serverUsedThreads;
    }

    public int getMaxThreads() {
        return maxThreads;
    }

    public void setMaxThreads(int maxThreads) {
        this.maxThreads = maxThreads;
    }

    public int getServerMaxThreads() {
        return serverMaxThreads;
    }

    public void setServerMaxThreads(int serverMaxThreads) {
        this.serverMaxThreads = serverMaxThreads;
    }

    public int getAvgThreadCont() {
        return avgThreadCont;
    }

    public void setAvgThreadCont(int avgThreadCont) {
        this.avgThreadCont = avgThreadCont;
    }

    public int getAvgDuration() {
        return avgDuration;
    }

    public void setAvgDuration(int avgDuration) {
        this.avgDuration = avgDuration;
    }

    public int getAverageOnlineGrowthRate() {
        return averageOnlineGrowthRate;
    }

    public void setAverageOnlineGrowthRate(int averageOnlineGrowthRate) {
        this.averageOnlineGrowthRate = averageOnlineGrowthRate;
    }

    public int getAverageSampleSize() {
        return averageSampleSize;
    }

    public void setAverageSampleSize(int averageSampleSize) {
        this.averageSampleSize = averageSampleSize;
    }

    public double getMaxThreadReserveRatio() {
        return maxThreadReserveRatio;
    }

    public void setMaxThreadReserveRatio(double maxThreadReserveRatio) {
        this.maxThreadReserveRatio = maxThreadReserveRatio;
    }

    public int getTotalSize() {
        return totalSize;
    }

    public void setTotalSize(int totalSize) {
        this.totalSize = totalSize;
    }

}